www.gusucode.com > Simulink Spell Checking Utility 程序工具箱matlab源码 > Simulink Spell Checking Utility/SpellCheck/utils/search_functions/getAnnotationWords.m

    function annotationWords = getAnnotationWords(systemName)
% Helps to get all the words in annotations of the given system.

antn = find_system(systemName,'FindAll','on','type','annotation');
annotationWords = '';
for ii = 1:numel(antn)
    antnText = get_param(antn(ii),'Text');
    antnText = regexp(antnText,'[^\s]*','match');
    annotationWords = [annotationWords antnText];
end

end